package _case

import (
	"gin-demo/controllers"
	"gin-demo/pkg/e"
	_case "gin-demo/service/case"
	"github.com/gin-gonic/gin"
	"net/http"
)

type CaseLabelLogController struct {
	controllers.BaseController
}

func (con CaseLabelLogController) List(c *gin.Context) {
	defer con.PanicHandler(http.StatusOK)
	con.C = c
	//page := common.GetPageIndex(c)
	//limit := common.GetPageLimit(c)
	//
	//labelName := common.GetQueryToStr(c, "label_name")
	//userName := common.GetQueryToStr(c, "user_id")
	//startTime := common.GetQueryToInt(c, "start_time")
	//stopTime := common.GetQueryToInt(c, "stop_time")
	//
	//caseLabelLog := new(models.CaseLabelLog)
	//caseLabelLog.CaseId = int64(common.GetQueryToInt(c, "case_id"))
	//caseLabelLog.SerialNumber = common.GetQueryToStr(c, "serial_number")
	//caseLabelLog.CaseLabelId = common.GetQueryToStr(c, "label_id")
	//caseLabelLog.CaseLabelName = common.GetQueryToStr(c, "label_name")
	//caseLabelLog.UserId = common.GetQueryToStr(c, "user_id")
	//caseLabelLog.AddTime = common.GetQueryToInt(c, "start_time")
	//caseLabelLog.AddTime = common.GetQueryToInt(c, "stop_time")
	list, total := _case.CaseLabelLogService.GetList(c)
	//fmt.Println(list)
	//fmt.Println(total)
	//fmt.Println(total)
	con.Response(http.StatusOK, e.SUCCESS, gin.H{
		"list":  &list,
		"total": total,
	})
}
